#!/usr/bin/python3
# -*- coding: utf-8 -*-

"""
# @version: v1.0
# @author : Wlis
# @Email : 19688213@qq.com
# @Project : py-stock-team
# @File : stockFundFlowIndustryData.py
# @Software: PyCharm
# @time: 2024/11/1 14:12
# @description : 行业资金流
"""

class StockFundFlowIndustryData:
    def __init__(self, index, industry, industry_index, industry_change, fund_inflow,
                 fund_outflow, net_amount, company_count, leading_stock, leading_stock_change,
                 current_price):
        """
        初始化行业资金流数据实例。

        :param index: 行业的索引
        :param industry: 行业名称
        :param industry_index: 行业指数值
        :param industry_change: 行业变动值（如涨跌幅）
        :param fund_inflow: 资金流入量
        :param fund_outflow: 资金流出量
        :param net_amount: 净流入量（资金流入 - 资金流出）
        :param company_count: 行业内公司的数量
        :param leading_stock: 领涨股票名称
        :param leading_stock_change: 领涨股票变动值
        :param current_price: 当前价格
        """
        self._index = index
        self._industry = industry
        self._industry_index = industry_index
        self._industry_change = industry_change
        self._fund_inflow = fund_inflow
        self._fund_outflow = fund_outflow
        self._net_amount = net_amount
        self._company_count = company_count
        self._leading_stock = leading_stock
        self._leading_stock_change = leading_stock_change
        self._current_price = current_price

    @property
    def index(self):
        """获取行业索引"""
        return self._index

    @index.setter
    def index(self, index):
        """设置行业索引"""
        self._index = index

    @property
    def industry(self):
        """获取行业名称"""
        return self._industry

    @industry.setter
    def industry(self, industry):
        """设置行业名称"""
        self._industry = industry

    @property
    def industry_index(self):
        """获取行业指数值"""
        return self._industry_index

    @industry_index.setter
    def industry_index(self, industry_index):
        """设置行业指数值"""
        self._industry_index = industry_index

    @property
    def industry_change(self):
        """获取行业变动值"""
        return self._industry_change

    @industry_change.setter
    def industry_change(self, industry_change):
        """设置行业变动值"""
        self._industry_change = industry_change

    @property
    def fund_inflow(self):
        """获取资金流入量"""
        return self._fund_inflow

    @fund_inflow.setter
    def fund_inflow(self, fund_inflow):
        """设置资金流入量"""
        self._fund_inflow = fund_inflow

    @property
    def fund_outflow(self):
        """获取资金流出量"""
        return self._fund_outflow

    @fund_outflow.setter
    def fund_outflow(self, fund_outflow):
        """设置资金流出量"""
        self._fund_outflow = fund_outflow

    @property
    def net_amount(self):
        """获取净流入量"""
        return self._net_amount

    @net_amount.setter
    def net_amount(self, net_amount):
        """设置净流入量"""
        self._net_amount = net_amount

    @property
    def company_count(self):
        """获取行业内公司的数量"""
        return self._company_count

    @company_count.setter
    def company_count(self, company_count):
        """设置行业内公司的数量"""
        self._company_count = company_count

    @property
    def leading_stock(self):
        """获取领涨股票名称"""
        return self._leading_stock

    @leading_stock.setter
    def leading_stock(self, leading_stock):
        """设置领涨股票名称"""
        self._leading_stock = leading_stock

    @property
    def leading_stock_change(self):
        """获取领涨股票变动值"""
        return self._leading_stock_change

    @leading_stock_change.setter
    def leading_stock_change(self, leading_stock_change):
        """设置领涨股票变动值"""
        self._leading_stock_change = leading_stock_change

    @property
    def current_price(self):
        """获取当前价格"""
        return self._current_price

    @current_price.setter
    def current_price(self, current_price):
        """设置当前价格"""
        self._current_price = current_price

    def __str__(self):
        """
        返回行业资金流数据的字符串表示。
        :return: 字符串形式的行业资金流数据
        """
        return (f"行业: {self.industry}, 行业指数: {self.industry_index}, "
                f"行业变动: {self.industry_change},  净流入: {self.net_amount}, "
                f"领涨股票: {self.leading_stock} ")
